package com.zmj.sy.mom.srv.aps.feign;

import com.zmj.sy.mom.srv.aps.bean.vo.base.BaseResVo;
import com.zmj.sy.mom.srv.aps.bean.vo.base.Result;
import com.zmj.sy.mom.srv.aps.bean.vo.qms.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient( name = "mom-srv-qms" , url = "${project.feign.qms-url}")
public interface QmsApiClient {

    @RequestMapping(path = "/part/sync", method = {RequestMethod.POST}, consumes = "application/json", produces = "application/json")
    BaseResVo syncPart(@RequestBody List<PartSyncReqVo> reqVo);

    @PostMapping("/task/generatePlateProcessTask")
    BaseResVo generatePlateProcessTask(@RequestBody TaskPlateProcessReqVo reqVo);

    @PostMapping("/tbQmsPlate/syncPlatePartData")
    Result syncPlatePartData(@RequestBody List<PlateReqVo> plateReqVos);

    @PostMapping("/task/generatePartTask")
    BaseResVo generatePartTask(@RequestBody TaskPartReqVo reqVo);

    @PostMapping("/task/generateAssemblyTask")
    BaseResVo generateAssemblyTask(@RequestBody TaskAssemblyReqVo reqVo);

    @PostMapping("/orderCheckPhase/generateJson")
    BaseResVo generateJson(@RequestBody OrderCheckPhaseGenerateFromBomReqVo reqVo);

}
